package cc.vv.mvp.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by sun.li on 2018/6/6.
 *
 * @author sun.li
 */

public class BaseRootView extends View{
    public BaseRootView(Context context) {
        super(context);
    }

    public BaseRootView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public BaseRootView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        //这个是当view从窗体移除的时候的回调函数，移除以后就不再绘制了，所以感觉这个方法最适合做资源回收。你可以在这里进行资源的释放
    }
}
